import Vue from 'vue'
// 直接将Vue组件作为Vue.extend的参数
import choiceGwmb from "./choiceGwmb";
import store from "@/store";

const showChoiceGwmb = (wordData, config) => {
    const choiceGwmbConstructor = Vue.extend(choiceGwmb);
    const instance = new choiceGwmbConstructor({
        el: document.createElement("div"),
        store
    });

    document.querySelector("body").appendChild(instance.$el);
    return instance.show(wordData, config);
}

export default showChoiceGwmb;